package com.mark.maven;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.PropertySource;

@SpringBootApplication
@PropertySource("classpath:application.properties")
public class MainAppliation {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(MainAppliation.class, args);
        System.out.println("db.username=" + context.getEnvironment().getProperty("db.username"));
    }
}
